package com.briup.web;

import com.briup.util.ResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;

@RestController
@Api(tags = "hello")
public class HelloController {
//    @ApiOperation(value = "test")
//    @GetMapping("/test")
//    public  String test(){
//        return"hello world";
//    }
//    @GetMapping("/test1")
//    @ApiOperation(value = "测试map返回")
//    public ResponseUtil test1(){
//        HashMap map = new HashMap();
//        map.put("name","tom");
//        map.put("gender","男");
//        map.put("age","12");
//        ResponseUtil responseUtil = ResponseUtil.ok(map);
//        return responseUtil;
//    }
    @GetMapping("/test2")
    @ApiOperation(value = "测试")
    public ResponseUtil test2(String name){
        System.out.println(name);

        ResponseUtil responseUtil = ResponseUtil.ok(name);
        return responseUtil;

    }

}
